﻿namespace Stopwatch
{
    using System;

    public static class TimeSpanExtensions
    {
        public static Time ToTime(this TimeSpan span)
        {
            return new Time(span.Hours, span.Minutes, span.Seconds, span.Milliseconds / 10);
        }

        public static Time ToShortTime(this TimeSpan span)
        {
            return new Time(span.Hours, span.Minutes, span.Seconds);
        }
    }
}
